<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HRF: Human readable log format</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Boost.Test">
<link rel="up" href="../log_formats.html" title="Log formats">
<link rel="prev" href="test_log_output.html" title="Test log output">
<link rel="next" href="log_xml_format.html" title="XML log format">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="test_log_output.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../log_formats.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="log_xml_format.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_test.test_output.log_formats.log_human_readable_format"></a><a class="link" href="log_human_readable_format.html" title="HRF: Human readable log format">HRF:
        Human readable log format</a>
</h4></div></div></div>
<p>
          The human readable log format is designed to closely match an errors description
          produced by the Microsoft family of C++ compilers. This format allows jumping
          to the error location, if test module output is redirected into IDE output
          window. The rest of the log messages are designed to produce the most human
          friendly description of the events occurring in test module. This is a
          default format generated by test modules.
        </p>
<p>
          Here the list of events along with corresponding message and the condition
          that has to be satisfied for it to appear in the output.
        </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                  <p>
                    Event
                  </p>
                </th>
<th>
                  <p>
                    Condition
                  </p>
                </th>
<th>
                  <p>
                    Output
                  </p>
                </th>
</tr></thead>
<tbody>
<tr>
<td>
                  <p>
                    On testing start
                  </p>
                </td>
<td>
                  <p>
                    threshold != log_nothing
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">Running</span> <span class="special">&lt;</span><span class="identifier">total</span> <span class="identifier">number</span>
                    <span class="identifier">of</span> <span class="identifier">test</span>
                    <span class="identifier">cases</span><span class="special">&gt;</span>
                    <span class="identifier">test</span> <span class="keyword">case</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">...</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On testing start
                  </p>
                </td>
<td>
                  <p>
                    threshold != log_nothing, show_build_info is set
                  </p>
                </td>
<td>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">Platform: $BOOST_PLATFORM
Compiler: $BOOST_COMPILER
STL     : $BOOST_STDLIB
Boost   : $BOOST_VERSION</pre>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On abnormal testing termination
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_messages
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">Test</span> <span class="identifier">is</span>
                    <span class="identifier">aborted</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On test unit start
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_test_units
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">Entering</span> <span class="identifier">test</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="identifier">unit</span> <span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
                    <span class="identifier">name</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On test unit end
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_test_units; testing time is reported only
                    if elapsed time is more than 1 us.
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">Leaving</span> <span class="identifier">test</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="identifier">unit</span> <span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
                    <span class="identifier">name</span><span class="special">&gt;;</span>
                    <span class="identifier">testing</span> <span class="identifier">time</span>
                    <span class="special">&lt;</span><span class="identifier">value</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On skipped test unit
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_test_units
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">Test</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="identifier">unit</span>
                    <span class="identifier">type</span><span class="special">&gt;</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="identifier">unit</span> <span class="identifier">name</span><span class="special">&gt;</span> <span class="identifier">is</span>
                    <span class="identifier">skipped</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On uncaught C++ exception
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_cpp_exception_errors. Checkpoint message
                    is reported only if provided
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
                    <span class="identifier">error</span> <span class="identifier">in</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
                    <span class="special">&lt;</span><span class="identifier">last</span>
                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
                    <span class="identifier">checkpoint</span><span class="special">:</span>
                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
                    <span class="identifier">message</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On resumable system error
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_system_errors. Checkpoint message is reported
                    only if provided
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
                    <span class="identifier">error</span> <span class="identifier">in</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
                    <span class="special">&lt;</span><span class="identifier">last</span>
                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
                    <span class="identifier">checkpoint</span><span class="special">:</span>
                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
                    <span class="identifier">message</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On fatal system error
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_fatal_errors. Checkpoint message is reported
                    only if provided
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="identifier">unknown</span> <span class="identifier">location</span><span class="special">(</span><span class="number">0</span><span class="special">):</span> <span class="identifier">fatal</span>
                    <span class="identifier">error</span> <span class="identifier">in</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="special">&lt;</span><span class="identifier">explanation</span><span class="special">&gt;</span>
                    <span class="special">&lt;</span><span class="identifier">last</span>
                    <span class="identifier">checkpoint</span> <span class="identifier">location</span><span class="special">&gt;:</span> <span class="identifier">last</span>
                    <span class="identifier">checkpoint</span><span class="special">:</span>
                    <span class="special">&lt;</span><span class="identifier">checkpoint</span>
                    <span class="identifier">message</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On passed test assertion
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_successful_tests
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">location</span><span class="special">&gt;:</span>
                    <span class="identifier">info</span><span class="special">:</span>
                    <span class="identifier">check</span><span class="special">&lt;</span><span class="identifier">assertion</span> <span class="identifier">expression</span><span class="special">&gt;</span> <span class="identifier">passed</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On failed WARNING level test assertion
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_warnings
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">location</span><span class="special">&gt;:</span>
                    <span class="identifier">warning</span> <span class="identifier">in</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="identifier">condition</span>
                    <span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">description</span><span class="special">&gt;</span>
                    <span class="identifier">is</span> <span class="keyword">not</span>
                    <span class="identifier">satisfied</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On failed CHECK level test assertion
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_all_errors
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">location</span><span class="special">&gt;:</span>
                    <span class="identifier">error</span> <span class="identifier">in</span>
                    <span class="special">&lt;</span><span class="identifier">test</span>
                    <span class="keyword">case</span> <span class="identifier">name</span><span class="special">&gt;:</span> <span class="identifier">check</span>
                    <span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">description</span><span class="special">&gt;</span>
                    <span class="identifier">failed</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On failed REQUIRE level test assertion
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_fatal_errors
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">location</span><span class="special">&gt;:</span>
                    <span class="identifier">fatal</span> <span class="identifier">error</span>
                    <span class="identifier">in</span> <span class="special">&lt;</span><span class="identifier">test</span> <span class="keyword">case</span>
                    <span class="identifier">name</span><span class="special">&gt;:</span>
                    <span class="identifier">critical</span> <span class="identifier">check</span>
                    <span class="special">&lt;</span><span class="identifier">assertion</span>
                    <span class="identifier">description</span><span class="special">&gt;</span>
                    <span class="identifier">failed</span></code>
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p>
                    On test log message
                  </p>
                </td>
<td>
                  <p>
                    threshold &lt;= log_messages
                  </p>
                </td>
<td>
                  <p>
                    <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">Message</span>
                    <span class="identifier">content</span><span class="special">&gt;</span></code>
                  </p>
                </td>
</tr>
</tbody>
</table></div>
<p>
          The level of details concerning the error message depends on the <a class="link" href="../../testing_tools.html" title="Writing unit tests">testing tool</a> producing the log
          entry.
        </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2022 Boost.Test contributors<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="test_log_output.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../log_formats.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="log_xml_format.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
